package com.sherlock.demo.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MyException {

    @ExceptionHandler(value = Exception.class)
    public void myException(Exception e) {
        System.out.println("======>错误信息：" + e.getMessage());
    }

}
